<%@ Page Title="" Language="C#" Inherits="System.Web.Mvc.ViewPage<Wheels.TransitODataService.Stop>" %>
<%@ Import Namespace="Wheels.TransitODataService" %>

<div id="BusStop" title="Bus Stop" class="panel">
    <h2>
        <%= Model.Name %></h2>
    <ul>
        <li><a href="/Transit/StopArrivals?stopId=<%=Model.StopId%>">All Arrivals</a></li>
    </ul>
    <% 
        if (Model.Routes.Count == 0)
        {%>
    <h3>
        No routes information</h3>
    <%}
        else
        {%>
    <h4>
        Routes:</h4>
    <ul>
        <%         
            foreach (var route in Model.Routes)
            {                              
        %>
        <li><a href="/Transit/BusRoute?RouteId=<%= route.RouteId%>&StopId=<%= Model.StopId%>">
            <%= route.RouteName.Trim()%></a></li>
        <%
            }
        }
        %>
    </ul>
    <a class="redButton" href="javascript:showStopDirection(<%=Model.Lat%>,<%=Model.Lon%>);">
        Map Direction</a>
    
</div>
